# Contributor: Hannes Braun <hannes@hannesbraun.net>
# Maintainer: Hannes Braun <hannes@hannesbraun.net>
pkgname=radio-cli
pkgver=2.3.1
pkgrel=0
pkgdesc="A simple radio CLI"
url="https://github.com/margual56/radio-cli"
# loongarch64: blocked by libc crate
arch="all !loongarch64"
license="GPL-2.0-only"
depends="mpv yt-dlp"
makedepends="cargo cargo-auditable openssl-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/margual56/radio-cli/archive/refs/tags/v$pkgver.tar.gz"
options="!check" # no tests

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

package() {
	install -Dm755 target/release/radio-cli "$pkgdir"/usr/bin/radio-cli
}

sha512sums="
e5ca17a81127640b350c1306cd9ec339dd6d819a38ac006a99c2a21dcae2fb82f87788caea529ac2dac3315a8dbb0c671157f019c762f92a8550c9be521a1adc  radio-cli-2.3.1.tar.gz
"
